<?php
namespace app\admin\controller;

use think\Controller;
use think\Exception;
use think\Log;
use think\Db;

class Index extends  Base
{

    //页面左侧
    public function index()
    {
        return view("index");
    }
    //首页
    public function welcome()
    {
        return view("welcome");
    }
    //无权访问
    public function Permission(){
        return view("/permission");
    }
    public function ajaxPermission(){
        return json(["code"=>-1,"msg"=>"您没权限"]);
    }
    //退出
    public function out_login()
    {
        session("admin",null);
        cookie("admin",null);
        $this->redirect("index/index");
    }
}
